﻿<%@ Page Title="" Language="C#" MasterPageFile="~/System/System.master" AutoEventWireup="true" CodeFile="Extensions.aspx.cs" Inherits="System_Pages_Settings_Extensions" %>
<%@ Register Src="~/System/Controls/Common/MessageBox.ascx" TagPrefix="ucc" TagName="MessageBox" %>
<%@ Register Src="~/System/Controls/FieldTemplates/MessageText.ascx" TagPrefix="ucc" TagName="MessageText" %>
<%@ Register Src="~/System/Controls/FieldTemplates/Boolean.ascx" TagPrefix="ucc" TagName="Boolean" %>
<%@ Register Src="~/System/Controls/FieldTemplates/HyperLink.ascx" TagName="HyperLink" TagPrefix="ucc" %>
<%@ Register Src="~/System/Controls/FieldTemplates/SinglelineText.ascx" TagName="SinglelineText" TagPrefix="ucc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SiteFox_Left" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SiteFox_Title" Runat="Server">
    <asp:Image ID="img_Title" runat="server" ImageUrl="~/System/Design/ico/32x32/node.png" ToolTip="<%$ Resources:dcCommon, dc_Extensions %>" />
    <asp:Label ID="lab_Title" runat="server" Text="<%$ Resources:dcCommon, dc_Extensions %>" />
    <asp:UpdatePanel ID="up_Title" runat="server">
        <ContentTemplate>
            <asp:ImageButton ID="imb_Add" runat="server" 
                ImageUrl="~/System/Design/ico/24x24/node_add.png" CssClass="ActionImgButton" 
                ToolTip="<%$ Resources:dcCommon, dc_ExtensionsAdd %>" onclick="imb_Add_Click" />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="SiteFox_Main" Runat="Server">
    <asp:UpdatePanel ID="up_Main" runat="server">
        <ContentTemplate>
            <asp:GridView ID="gv_Extensions" runat="server" GridLines="None" Width="100%" ShowHeader="true" AutoGenerateColumns="false" RowStyle-CssClass="GridViewRow">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image" runat="server" ImageUrl='<%# Eval("SmallIconUrl") %>' Width="16" Height="16" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Ext" HeaderText="<%$ Resources:dcCommon, dc_Ext %>" Visible="true" ItemStyle-HorizontalAlign="Center" />
                    <asp:BoundField DataField="Name" HeaderText="<%$ Resources:dcCommon, dc_Name %>" Visible="true" />
                    <asp:CheckBoxField DataField="AllowCreate" HeaderText="<%$ Resources:dcCommon, dc_Create %>" Visible="true" ItemStyle-HorizontalAlign="Center" />
                    <asp:CheckBoxField DataField="AllowUpload" HeaderText="<%$ Resources:dcCommon, dc_Upload %>" Visible="true" ItemStyle-HorizontalAlign="Center" />
                    <asp:CheckBoxField DataField="AllowDownload" HeaderText="<%$ Resources:dcCommon, dc_Download %>" Visible="true" ItemStyle-HorizontalAlign="Center" />
                    <asp:CheckBoxField DataField="Hidden" HeaderText="<%$ Resources:dcCommon, dc_Hidden %>" Visible="true" ItemStyle-HorizontalAlign="Center" />
                    <asp:TemplateField ItemStyle-HorizontalAlign="Right">
                        <ItemTemplate>
                            <asp:ImageButton ID="imb_Edit" runat="server" ImageUrl="~/System/Design/ico/16x16/edit.png" OnClick="imb_Edit_Click" CommandArgument='<%# Eval("Ext") %>' />
                            <asp:ImageButton ID="imb_Delete" runat="server" ImageUrl="~/System/Design/ico/16x16/delete2.png" OnClick="imb_Delete_Click" CommandArgument='<%# Eval("Ext") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>

            <ucc:MessageBox ID="ucc_MessageBox" runat="server" Text="" Visible="false" />

            <asp:Panel ID="pan_AddOrEdit" runat="server" Visible="false">
                <div class="ActionPanel_Background"></div>
                <div class="ActionPanel">
                    <div class="ActionPanel_Header">
                        <asp:Label ID="lab_AddOrEdit_Title" runat="server" />
                        <asp:ImageButton ID="imb_AddOrEdit_Close" runat="server" CssClass="ActionPanel_Close" ImageUrl="~/System/Design/ico/24x24/delete.png" onclick="imb_AddOrEdit_Close_Click" />
                    </div>
                    <div class="ActionPanel_Content">
                        <ucc:SinglelineText ID="ucc_AddOrEdit_Ext" runat="server" Title="<%$ Resources:dcCommon, dc_Ext %>" />
                        <ucc:SinglelineText ID="ucc_AddOrEdit_Name" runat="server" Title="<%$ Resources:dcCommon, dc_Name %>" />
                        <ucc:HyperLink ID="ucc_AddOrEdit_BigIconUrl" runat="server" Title="<%$ Resources:dcCommon, dc_BigIconUrl %>" RootPath="~/Config/Icons/Big/" ShowFiles="true" IsReq="false" />
                        <ucc:HyperLink ID="ucc_AddOrEdit_SmallIconUrl" runat="server" Title="<%$ Resources:dcCommon, dc_SmallIconUrl %>" RootPath="~/Config/Icons/Small/" ShowFiles="true" IsReq="false" />
                        <div class="FieldTemplates_Row">
                            <asp:Label ID="lab_AddOrEdit_New_CanCreate_Title" runat="server" CssClass="Label" Text="<%$ Resources:dcCommon, dc_CreateNew %>" />
                            <asp:CheckBox ID="cb_AddOrEdit_New_CanCreate_Value" CssClass="CheckBox" runat="server" />
                        </div>
                        <ucc:Boolean ID="ucc_AddOrEdit_Permission_Upload" runat="server" Title="<%$ Resources:dcCommon, dc_AllowUpload %>" />
                        <ucc:Boolean ID="ucc_AddOrEdit_Permission_Download" runat="server" Title="<%$ Resources:dcCommon, dc_AllowDownload %>" />
                        <ucc:Boolean ID="ucc_AddOrEdit_Permission_Hidden" runat="server" Title="<%$ Resources:dcCommon, dc_Hidden %>" />
                        <asp:LinkButton ID="lib_AddOrEdit_Ok" runat="server" CssClass="LinkButton" ValidationGroup="mainValGroup" onclick="lib_AddOrEdit_Ok_Click" />
                        <asp:HiddenField ID="hf_AddOrEdit_Ext" runat="server" />
                    </div>
                </div>
            </asp:Panel>

            <asp:Panel ID="pan_Delete" runat="server" Visible="false">
                <div class="ActionPanel_Background"></div>
                <div class="ActionPanel">
                    <div class="ActionPanel_Header">
                        <asp:Label ID="lab_Delete_Title" runat="server" Text="<%$ Resources:dcCommon, dc_Delete %>" />
                        <asp:ImageButton ID="imb_Delete_Close" runat="server" CssClass="ActionPanel_Close" ImageUrl="~/System/Design/ico/24x24/delete.png" onclick="imb_Delete_Close_Click" />
                    </div>
                    <div class="ActionPanel_Content">
                        <ucc:MessageText ID="ucc_Delete_Text" runat="server" Title="" Value="<%$ Resources:dcCommon, dc_ConfirmDeleting %>" />
                        <asp:LinkButton ID="lib_Delete_Ok" runat="server" CssClass="LinkButton" Text="<%$ Resources:dcCommon, dc_Confirm %>" ValidationGroup="mainValGroup" 
                            onclick="lib_Delete_Ok_Click" />
                        <asp:HiddenField ID="hf_Delete_Ext" runat="server" />
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel> 
</asp:Content>

